package com.atguigu.gulimall.seckill.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
//@EnableScheduling
//@EnableAsync
public class HelloSchedule {
    /**
     * spring 自己的定时任务
     */
//    @Async
//    @Scheduled(cron = "*/2 * * * * ?")
//    public void hello(){
//        log.info("hello...");
//        try {
//            Thread.sleep(4000);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
//    }


}
